home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / MahJongSolitaire.swf / scripts / frame_3 / PlaceObject2_191_230 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Encoding:
Text File  |  2005-08-04  |  924 b   |  37 lines

  1. onClipEvent(enterFrame){
  2.    if(this.tile1 != null && this.tile2 != null)
  3.    {
  4.       if(_root[tile1]._alpha < 10)
  5.       {
  6.          _root.RemoveTile(tile1);
  7.          _root.RemoveTile(tile2);
  8.          this.tile1 = null;
  9.          this.tile2 = null;
  10.       }
  11.       if(_root[tile1].course == "right")
  12.       {
  13.          _root[tile1]._x += 3;
  14.          _root[tile1]._y -= 1;
  15.          _root[tile1]._alpha -= 20;
  16.       }
  17.       else if(_root[tile1].course == "left")
  18.       {
  19.          _root[tile1]._x -= 3;
  20.          _root[tile1]._y += 1;
  21.          _root[tile1]._alpha -= 20;
  22.       }
  23.       if(_root[tile2].course == "right")
  24.       {
  25.          _root[tile2]._x += 3;
  26.          _root[tile2]._y -= 1;
  27.          _root[tile2]._alpha -= 20;
  28.       }
  29.       else if(_root[tile2].course == "left")
  30.       {
  31.          _root[tile2]._x -= 3;
  32.          _root[tile2]._y += 1;
  33.          _root[tile2]._alpha -= 20;
  34.       }
  35.    }
  36. }
  37.